<?php
namespace Swiftx\Bundle\WeChat\Interfaces\Common;
use Swiftx\Interfaces\Orm\Manager;

/**
 * 实体模型基类
 */
abstract class EntityModel extends BaseModel {

    /**
     * 对象主键
     * @var string
     * @orm constraint primary
     * @orm constraint no-null
     * @orm type char(36)
     * @orm column ID
     */
    protected $id;

    /**
     * 构造生成器
     */
    public function __construct(){
        $this->id = $this->generateUUID();
    }

    /**
     * 读取主键
     * @return string
     */
    public function getID():string {
        return $this->id;
    }

}